package com.mcxx.modules.miniSalvation.order.service.read;

import com.mcxx.modules.miniSalvation.family.dto.MemberAssetsDTO;
import com.mcxx.modules.miniSalvation.family.entity.MemberAssetsEntity;
import com.mcxx.modules.miniSalvation.family.service.read.MemberAssetsReadService;
import com.mcxx.modules.miniSalvation.order.dao.read.OrderDetailReadDao;
import com.mcxx.modules.miniSalvation.order.dto.OrderApproveDTO;
import com.mcxx.modules.miniSalvation.order.dto.OrderDetailDTO;
import com.mcxx.util.Constant;
import com.yinhai.ta404.core.service.BaseService;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service("orderDetailReadService")
@TaTransactional(readOnly = true)
public class OrderDetailReadService  extends BaseService {

    @Autowired
    private OrderDetailReadDao orderDetailReadDao;

    public OrderDetailDTO getOrderDetail(String orderId, String checkDatailStatus){
        OrderDetailDTO orderDetailDTO = orderDetailReadDao.getDetailByOrderIdAndCheckType(orderId, checkDatailStatus);
        return orderDetailDTO;
    }


    public OrderApproveDTO getSalvationApprove(String orderId, String checkDatailStatus){
        return orderDetailReadDao.getSalvationApprove(orderId, checkDatailStatus);
    }

    public List<OrderApproveDTO> getApproveList(String orderId,String checkType,String checkResult){
        return orderDetailReadDao.getApproveList(orderId,checkType,checkResult);
    }


    public List<OrderApproveDTO> getRevokeList(String orderId,String checkType){
        return orderDetailReadDao.getRevokeList(orderId,checkType);
    }


    public OrderApproveDTO getSaveSalvation(String orderId, String checkDatailStatus){
        return orderDetailReadDao.getSaveSalvation(orderId, checkDatailStatus);
    }


    public String getSalvationNo(String orderId){
        return orderDetailReadDao.getSalvationNo(orderId);
    }

}
